-- GENERATED SPELL FOR [Thane Banahogg] --


function spell0_31277(pUnit, Event) --@Execute,n/a--
pUnit:FullCastSpellOnTarget(61140,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31277', 0, 1)
end

function spell1_31277(pUnit, Event) --@Leap,n/a--
pUnit:FullCastSpellOnTarget(61134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31277', 553, 1)
end

function spell2_31277(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(13737,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31277', 5303, 1)
end

function spell3_31277(pUnit, Event) --@Punt,n/a--
pUnit:FullCastSpellOnTarget(61133,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31277', 500, 1)
end

function spell4_31277(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(61139,pUnit)
pUnit:RegisterEvent('Sorts_31277', 598, 1)
end

function Sorts_31277(pUnit, Event)
local choix_sorts_31277 = math.random(0, 4)
if choix_sorts_31277 == 0 then
pUnit:RegisterEvent('spell0_31277', 1, 1)
end
if choix_sorts_31277 == 1 then
pUnit:RegisterEvent('spell1_31277', 1, 1)
end
if choix_sorts_31277 == 2 then
pUnit:RegisterEvent('spell2_31277', 1, 1)
end
if choix_sorts_31277 == 3 then
pUnit:RegisterEvent('spell3_31277', 1, 1)
end
if choix_sorts_31277 == 4 then
pUnit:RegisterEvent('spell4_31277', 1, 1)
end
end

function mob31277_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31277', math.random(1500, 3000), 1)
end

function mob31277_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31277_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31277_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31277, 1, 'mob31277_Action')
RegisterUnitEvent(31277, 2, 'mob31277_Leave')
RegisterUnitEvent(31277, 3, 'mob31277_Kill')
RegisterUnitEvent(31277, 4, 'mob31277_Die')
